import java.net.*;
import java.io.*;
public class ReadURL{
	public static void main(String args[])throws Exception{
		try {
			String test = "http://www.google.com.hk/";
			URL url = new URL(test);
			InputStreamReader isr = new InputStreamReader(url.openStream(),"UTF-8");
			BufferedReader br = new BufferedReader(isr);

			String str;
			while((str = br.readLine()) != null){
				System.out.println(str);
			}

			br.close();
			isr.close();
		}catch(Exception e){
			System.out.println(e);
		}
	}
}
